Skip to content

feat(inbox): gate remaining inbox surfaces behind posthog-code-inbox flag#1840

Merged
joshsny merged 1 commit intoposthog-code/gate-inbox-behind-feature-flagfrom
joshsny/gate-inbox-remaining-surfaces-6eca
Apr 22, 2026
Merged

feat(inbox): gate remaining inbox surfaces behind posthog-code-inbox flag#1840
joshsny merged 1 commit intoposthog-code/gate-inbox-behind-feature-flagfrom
joshsny/gate-inbox-remaining-surfaces-6eca

Conversation

@joshsny
Copy link
Copy Markdown
Contributor

@joshsny joshsny commented Apr 22, 2026

Problem

PR #1828 gated the sidebar inbox item and inbox view behind the posthog-code-inbox feature flag, but several other surfaces still reference the inbox unconditionally. When the flag is off, users can still see signals-related UI in onboarding, settings, the welcome screen, and the keyboard shortcuts sheet — which is confusing and defeats the purpose of the kill switch.

Stacks on #1828.

Changes

Gates all remaining inbox/signals surfaces behind posthog-code-inbox:

  • Onboarding flow (useOnboardingFlow.ts): Filters out the "signals" onboarding step when the flag is off, using the same pattern already used for "invite-code".
  • Settings dialog (SettingsDialog.tsx): Hides the "Signals" sidebar entry when the flag is off, using the same filter pattern already used for "plan-usage" / billing.
  • Welcome screen (WelcomeScreen.tsx): Removes the "Your signals inbox" feature bullet from the welcome features list when the flag is off.
  • Keyboard shortcut (GlobalEventHandlers.tsx): Disables the mod+i inbox hotkey when the flag is off via enabled: inboxEnabled.
  • Shortcuts sheet (KeyboardShortcutsSheet.tsx): Hides the "Open inbox" shortcut from the keyboard shortcuts list when the flag is off.

How did you test this?

  • Verified typecheck passes (all errors are pre-existing unrelated @posthog/platform / @posthog/git module resolution issues)
  • Verified biome lint passes with no new warnings
  • Reviewed all changes manually for correctness

Slack Thread

Open in Web Open in Cursor 

…flag

- Onboarding: filter out 'signals' step when flag is off
- Settings: hide 'Signals' sidebar entry when flag is off
- Welcome screen: hide 'Your signals inbox' feature bullet when flag is off
- Keyboard shortcut: disable mod+i inbox hotkey when flag is off
- Shortcuts sheet: hide inbox shortcut from list when flag is off
@joshsny joshsny marked this pull request as ready for review April 22, 2026 15:06
@joshsny joshsny merged commit 93c7a90 into posthog-code/gate-inbox-behind-feature-flag Apr 22, 2026
10 checks passed
@joshsny joshsny deleted the joshsny/gate-inbox-remaining-surfaces-6eca branch April 22, 2026 15:06
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 22, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 60

Comment:
**`CYCLE_START_DELAY_MS` ignores runtime feature count**

This constant is computed at module load using `ALL_FEATURES.length` (5), so when inbox is disabled the animation intro delay is 900 ms instead of the intended 800 ms (4 items × 100 ms + 400 ms). The difference is imperceptible, but the intent was clearly to match the number of rendered items. Consider deriving the delay inside the component from `features.length` instead.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 144-145

Comment:
**Prefer stable `id` as React list key**

Each item in `ALL_FEATURES` now has a dedicated `id` field. Using it as the list key is more robust than relying on the display title string.

```suggestion
                <FeatureListItem
                  key={feature.id}
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(inbox): gate remaining inbox surfac..." | Re-trigger Greptile


const CYCLE_INTERVAL_MS = 2500;
const CYCLE_START_DELAY_MS = FEATURES.length * 100 + 400;
const CYCLE_START_DELAY_MS = ALL_FEATURES.length * 100 + 400;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 CYCLE_START_DELAY_MS ignores runtime feature count

This constant is computed at module load using ALL_FEATURES.length (5), so when inbox is disabled the animation intro delay is 900 ms instead of the intended 800 ms (4 items × 100 ms + 400 ms). The difference is imperceptible, but the intent was clearly to match the number of rendered items. Consider deriving the delay inside the component from features.length instead.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 60

Comment:
**`CYCLE_START_DELAY_MS` ignores runtime feature count**

This constant is computed at module load using `ALL_FEATURES.length` (5), so when inbox is disabled the animation intro delay is 900 ms instead of the intended 800 ms (4 items × 100 ms + 400 ms). The difference is imperceptible, but the intent was clearly to match the number of rendered items. Consider deriving the delay inside the component from `features.length` instead.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 144 to 145
<FeatureListItem
key={feature.title}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Prefer stable id as React list key

Each item in ALL_FEATURES now has a dedicated id field. Using it as the list key is more robust than relying on the display title string.

Suggested change
<FeatureListItem
key={feature.title}
<FeatureListItem
key={feature.id}
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 144-145

Comment:
**Prefer stable `id` as React list key**

Each item in `ALL_FEATURES` now has a dedicated `id` field. Using it as the list key is more robust than relying on the display title string.

```suggestion
                <FeatureListItem
                  key={feature.id}
```

How can I resolve this? If you propose a fix, please make it concise.

joshsny added a commit that referenced this pull request Apr 22, 2026
…flag (#1840)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants